home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_055 / pipedevice / examples next >
Text File  |  1992-05-06  |  2KB  |  52 lines

  1. Article 1980 of comp.sys.amiga:
  2. Path: mcdsun!noao!hao!hplabs!ucbvax!CORY.BERKELEY.EDU!dillon
  3. From: dillon@CORY.BERKELEY.EDU (Matt Dillon)
  4. Newsgroups: comp.sys.amiga
  5. Subject: Other PIPE examples
  6. Message-ID: <8702070034.AA26028@cory.Berkeley.EDU>
  7. Date: 7 Feb 87 00:34:28 GMT
  8. Sender: daemon@ucbvax.BERKELEY.EDU
  9. Organization: University of California at Berkeley
  10. Lines: 38
  11.  
  12. Lets say you want to look at a hunk disassembly of AMIGA.LIB . The
  13. ascii dump that HUNKS gives for that is well over 200K.  Assuming you have
  14. limited memory and can't have the file in RAM and edit it at the same
  15. time, and assuming you don't want to wait for it to dump to disk:
  16.  
  17.     CLI 1>    hunks >pipe:xx amiga.lib
  18.     CLI 2>    med pipe:xx
  19.  
  20.     where HUNKS is the hunk-dumping program, and MED is an editor.  MED
  21.     was barely able to fit the entire file in my 512K Amiga.
  22.  
  23. Another cute thing I did just for laughs was to Capture to a pipe:xx file
  24. from my terminal program, and have a
  25.  
  26.     CLI 1>    wordcount pipe:xx
  27.  
  28.     running from the CLI.  When I finish the session and the terminal
  29.     program closes the Capture, the wordcount gets an EOI and tells me
  30.     how many chars/words/lines came over the modem in that session.
  31.  
  32.  
  33. Any program which writes out small buffer sizes to disk can be made more 
  34. efficient by specifying a pipe as the output file, and then running a 
  35. copy concurrently (which uses large buffer sizes):
  36.  
  37.     CLI 1>    hunks >pipe:a amiga.lib 
  38.     CLI 2>    fgrep >pipe:b LVO pipe:a 
  39.     CLI 3>    copy pipe:b file
  40.  
  41.  
  42. I haven't tried this yet, but it should be possible to specify a pipe as
  43. a compiler's temporary file, then have all passes of the compiler, including
  44. the assembler or code generator in memory and running at the same time.  
  45. Needless to say this presumes having a lot of memory in your Amiga... say,
  46. 2 Megs?
  47.  
  48.  
  49.                     -Matt
  50.  
  51.  
  52.